package com.clh.seckill.exception;

import com.clh.seckill.vo.RespBean;
import com.clh.seckill.vo.RespBeanEnum;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author cailinhu
 * @Description 自定义异常类
 * @Date 2021-10-28 10:16
 * @Version 1.0
 */
@Data
@NoArgsConstructor
public class GlobalException extends RuntimeException {
    private RespBeanEnum respBeanEnum;
    public GlobalException(RespBeanEnum respBeanEnum){
        super(respBeanEnum.getMessage());
        this.respBeanEnum=respBeanEnum;
    }
}
